@extends('frontend/layouts/default')

@section('content')

<h1>Edit Code</h1>
{{ Form::model($code, array('method' => 'PATCH', 'route' => array('nd.master.code.update', $code->getJointPk()))) }}

<div class="row-fluid">
<div  class="span3 control-group {{ $errors->first('domainid', ' error') }}">
	<label class="control-label" for="domainid">Domainid</label>
	<input class="input-block-level" placeholder="Domainid" title="Domainid" name="domainid" type="number" value="{{ Input::old('domainid', $code->domainid) }}">
	{{ $errors->first('domainid', '<span class="help-block">:message</span>') }}
</div>
<div  class="span3 control-group {{ $errors->first('codetype', ' error') }}">
	<label class="control-label" for="codetype">Codetype</label>
	<input class="input-block-level" placeholder="Codetype" title="Codetype" name="codetype" type="text" value="{{ Input::old('codetype', $code->codetype) }}">
	{{ $errors->first('codetype', '<span class="help-block">:message</span>') }}
</div>
<div  class="span3 control-group {{ $errors->first('code', ' error') }}">
	<label class="control-label" for="code">Code</label>
	<input class="input-block-level" placeholder="Code" title="Code" name="code" type="text" value="{{ Input::old('code', $code->code) }}">
	{{ $errors->first('code', '<span class="help-block">:message</span>') }}
</div>
<div  class="span3 control-group {{ $errors->first('name', ' error') }}">
	<label class="control-label" for="name">Name</label>
	<input class="input-block-level" placeholder="Name" title="Name" name="name" type="text" value="{{ Input::old('name', $code->name) }}">
	{{ $errors->first('name', '<span class="help-block">:message</span>') }}
</div>
<div  class="span3 control-group {{ $errors->first('description', ' error') }}">
	<label class="control-label" for="description">Description</label>
	<textarea class="input-block-level" placeholder="Description" title="Description" rows="2" cols="100" name="description">{{ Input::old('description', $code->description) }}</textarea>
	{{ $errors->first('description', '<span class="help-block">:message</span>') }}
</div>
<div  class="span3 control-group {{ $errors->first('sortno', ' error') }}">
	<label class="control-label" for="sortno">Sortno</label>
	<input class="input-block-level" placeholder="Sortno" title="Sortno" name="sortno" type="number" value="{{ Input::old('sortno', $code->sortno) }}">
	{{ $errors->first('sortno', '<span class="help-block">:message</span>') }}
</div>
</div>

<div>
{{ Form::submit('Update', array('class' => 'btn btn-info')) }} &nbsp;&nbsp;
{{ link_to_route('nd.master.code.show', 'Cancel', $code->getJointPk(), array('class' => 'btn')) }}
</div>

{{ Form::close() }}

@stop